.alert {
  border: 0;
  border-radius: $border-radius-extreme;
  color: var(--black);
  padding: 10px 15px;
  font-size: 14px;
  z-index: 1000;

  .container & {
    border-radius: 4px;
  }
  .navbar & {
    border-radius: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 85px;
    width: 100%;
    z-index: 3;
  }
  .navbar:not(.navbar-transparent) & {
    top: 70px;
  }

  span[data-notify="icon"] {
    font-size: 30px;
    display: block;
    left: 15px;
    position: absolute;
    top: 50%;
    margin-top: -20px;
  }

  .close ~ span {
    display: block;
    max-width: 89%;
  }

  &[data-notify="container"] {
    padding: 10px 10px 10px 20px;
    border-radius: $border-radius-base;
  }

  &.alert-with-icon {
    padding-left: 65px;
  }
  // Headings for larger alerts
  h4 {
    margin-top: 0;
    color: inherit; // Specified for the h4 to prevent conflicts of changing $headings-color
  }

  // Provide class for links that match alerts
  .alert-link {
    font-weight: $alert-link-font-weight;
  }

  // Improve alignment and spacing of inner content
  > p,
  > ul {
    margin-bottom: 0;
  }

  > p + p {
    margin-top: 5px;
  }
}

.alert {
  background-color: var(--background-color-accent-lvl2);
  color: var(--black);
}

.alert-primary {
  background-color: var(--primary-bg-color);
}

.alert-info {
  font-weight: 700;
  background-color: var(--cyan-500);
  color: var(--white);
  margin-bottom: var(--spacing-6);
  .close {
    color: var(--white);
  }
}

.alert-success {
  font-weight: 700;
  background-color: var(--green-500);
  color: var(--white);
  margin-bottom: var(--spacing-6);
  .close {
    color: var(--white);
  }
}

.alert-warning {
  font-weight: 700;
  background-color: var(--orange-500);
  color: var(--black);
  margin-bottom: var(--spacing-6);
  .close {
    color: var(--black);
  }
}

.alert-danger {
  font-weight: 700;
  background-color: var(--red-500);
  color: var(--white);
  margin-bottom: var(--spacing-6);
  .close {
    color: var(--white);
  }
}

// Dismissible alerts
//
// Expand the right padding and account for the close button's positioning.

// The misspelled .alert-dismissable was deprecated in 3.2.0.
.alert-dismissable,
.alert-dismissible {
  padding-right: ($alert-padding + 20);

  // Adjust close link position
  .close {
    position: relative;
    top: -2px;
    color: inherit;
  }
}
